Skip to content

Composer integration, PSR coding standards #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Composer integration, PSR coding standards #6

wants to merge 8 commits into from

Conversation

a-vasyliev
Copy link

Hi, here is my proposal of improvement of your great work. Thank you for nice script. I've only added possibility to integrate your work into Composer to be able easily use it inside Composer-based projects. Also, I've found useful to migrate to PSR coding standards (it is used by most modern big PHP projects)

@@ -0,0 +1,147 @@
<?php

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use git mv to move this file.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git mv might not do what you think it does. He likely made enough changes to the file that it's no longer recognized as a rename.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evanpurkhiser Thank you)

@malukenho
Copy link

👍

@ream88
Copy link

ream88 commented Nov 24, 2015

Please merge this!

#!/usr/bin/env php
<?php

include(__DIR__ . '/../array-converter.php');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include is a special language construct

include __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR  . 'array-converter.php';

@angelxmoreno
Copy link

can we have these PR pull from master to be updated?

Copy link

@vincentchalamon vincentchalamon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @a-vasyliev for your contribution :-)
Please rebase from master.
@thomasbachem Is this project still maintained?

$saveFile = false;

if ($argc > 3) {
file_put_contents('php://stderr', 'Usage: php convert.php [-w] <file>' . "\n");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Usage: php array-converter.php…'


if ($isArraySyntax) {
// Replace "array" and the opening bracket (including preceeding whitespace) with "["
$replacements[] = array(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you could use short syntax array in this short syntax array converter? 😉

file_put_contents($filePath, $code);
} else {
print $code;
}
Copy link

@vincentchalamon vincentchalamon Feb 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOF break line missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants